home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / fvect.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  1.3 KB  |  35 lines  |  [TEXT/MPS ]

  1. (* Operations on vectors, without sanity checks *)
  2.  
  3. (* This module implements the same functions as the [vect] module,
  4.    but does not perform bound checks on the arguments of the functions.
  5.    The functions are therefore faster than those in the [vect] module,
  6.    but calling these functions with incorrect parameters (that is,
  7.    parameters that would cause the [Invalid_argument] exception to be raised
  8.    by the corresponding functions in the [vect] module) can crash the
  9.    program. *)
  10.  
  11. (*--*)
  12.  
  13. value vect_length : 'a vect -> int = 1 "vect_length"
  14. ;;
  15. value vect_item : 'a vect -> int -> 'a = 2 "get_vect_item"
  16.   and vect_assign : 'a vect -> int -> 'a -> unit = 3 "set_vect_item"
  17. ;;
  18. value make_vect : int -> 'a -> 'a vect = 2 "make_vect"
  19.   and make_matrix : int -> int -> 'a -> 'a vect vect
  20. ;;
  21. value concat_vect : 'a vect -> 'a vect -> 'a vect
  22.   and sub_vect : 'a vect -> int -> int -> 'a vect
  23.   and copy_vect: 'a vect -> 'a vect
  24. ;;
  25. value fill_vect : 'a vect -> int -> int -> 'a -> unit
  26.   and blit_vect : 'a vect -> int -> 'a vect -> int -> int -> unit
  27. ;;
  28. value list_of_vect : 'a vect -> 'a list
  29.   and vect_of_list : 'a list -> 'a vect
  30. ;;
  31. value do_vect : ('a -> 'b) -> 'a vect -> unit
  32.   and map_vect : ('a -> 'b) -> 'a vect -> 'b vect
  33.   and map_vect_list : ('a -> 'b) -> 'a vect -> 'b list
  34. ;;
  35.